import Tool from  'tool/tool.jsx';
const _req = new Tool();

class OrderService{

   //获取订单列表
   getOrderList(listParam){  
      let url = '',
          data = {};
      if(listParam.listType === 'list'){
        url = '/manage/order/list.do';
        data.pageNum = listParam.pageNum;
      }else if(listParam.listType === 'search'){
        url = '/manage/order/search.do';
        data.pageNum =listParam.pageNum;
        data.orderNo = listParam.orderNo;
      }
      return _req.request({
      type: 'post', 
      url : url,
      data: data
      })
    }

   //查看订单详情
   getOrderDetail(orderNo){
    return _req.request({
      type: 'post', 
      url :'/manage/order/detail.do',
      data:{
        orderNo : orderNo || 0
      }
    })
   }


  }


export default OrderService;